COMMAND_LIST = '''
        COMMAND           DESCRIPTION

    help              Display this help string.

    help <command>    Display detailed information for a particular command.

    clear <property>  Reset <property> to its default value.

    clear all         Reset all properties to their default values.

    exit              Leave the RS Simulator shell.

    properties        List all of the program properties and their definitions,
                      as well as any constraints on their values.

    run               Run the C program with the current settings.

    set <property>    Set the value of <property>.  If <property> is a boolean
                      variable, the value is merely toggled.  If <property> is 
                      non-boolean, a prompt requests the value of <property>.

    view <property>   Print out the value of <property>.

    view all          Print out the values of all properties.

'''

COMMAND_HELP = '''
Display a list of the available RS shell commands and brief descriptions of 
their functions.  If "help <command>" is entered, display a detailed 
description of <command>.
'''

COMMAND_EXIT = '''
Exit the RS shell.
'''

COMMAND_CLEAR = '''
Reset the value of an input property to its default value.  For example:

    clear m

resets m to its default value of -1.  Type "clear all" to reset ALL properties 
to their default values.
'''

COMMAND_PROPERTIES = '''
Print a list of all RS Shell properties and their definitions, as well as any 
constraints on their values.
'''

COMMAND_RUN = '''
Run the C program with the current system properties.
'''

COMMAND_SET = '''
Type "set <property>" to set the value of "<property>".  A sub-prompt will ask 
for a value, in the following format:

    RS> set m
    Enter a value for m: 

Enter the desired value into the sub-prompt. To cancel out of the subprompt, 
simply enter a blank string.
'''

COMMAND_VIEW = '''
Type "view <property>" to display the current value of <property>.  Type 
"view all" to see a table of all properties and their current values.
'''

# Define the decoder mode values
MODE_SERIAL = '0';
MODE_PTHREAD = '1';
MODE_OPENMP_STATIC = '2';
MODE_OPENMP_GUIDED = '3';
MODE_OPENMP_DYNAMIC = '4';

PROPERTY_LIST = '''
                          GENERAL C PROGRAM FLAGS

    help            On execution of the C program, display help message and exit.

    verbose         Print out status messages as C program executes.

    test            Run C program tests and print test output to stdout.


                      GALOIS FIELD AND CODE PARAMETERS

    m               Galois Field order - work in GF(2^m).
                    Must be an integer between 1 and 8.

    t               Generate a t-error-correcting code.
                    Must be an integer such that 2*t < 2^(m-1) - 1.

                        PARALLELIZATION PARAMETERS
    num_DEs         Number of decoding elements (openMP elements).
                    Must be a positive integer no greater than 1024.

    decoder_mode    Set the decoder mode.  The options are:
                    serial            No parallelization
                    pthread           pthread parallelization at decoder level
                    openMP (static)   openMP with static allocation
                    openMP (dynamic)  openMP with dynamic allocation
                    openMP (guided)   openMP with guided allocation

                           DATA SOURCE PROPERTIES
             Several data sources are possible, as seen as follows:
        
    1. Input file
    ifile          Input data file.

    2. Decoded data output file
    dfile          Output of decoded data file

    3. Generate data at runtime
    ofile          Save the generated data in the file ofile instead
                   of deleting temporary file.

    gen_data       Generate new data, don't read from a file.

    no_run         Don't run the RS simulation, just generate data.

    data_length    Length (in data symbols) of new data to be generated.
                   Must be a positive integer no less than than 2^m - 1.
    
    Generate the data with a single error probability at each symbol, all 
    symbols iid:
    e_prob;         Prob. of error in each symbol in generated data.
                    Must be a nonnegative number no greater than 1.

    Generate a fixed number of errors per code word, according to a 
    given distribution:
    e_per_word      Fixed number of errors per word.  Must be a nonnegative
                    integer no greater than 2^m - 1.

    e_pmf           Probability distribution (pmf) of error locations.
                    Number of entries has to match code word length.
                    Entries must sum to 1.
                    Format: [<p1>,<p2>,...,<p(2^m - 1)>]
                    where pi is the ith probability.

'''
